home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
pdox693.zip
/
TI520.ASC
< prev
next >
Wrap
Text File
|
1992-12-03
|
3KB
|
133 lines
PRODUCT : Paradox NUMBER : 520
VERSION : All
OS : DOS
DATE : December 3, 1992 PAGE : 1/2
TITLE : Rounding Values in a Field
This Technical Information sheet illustrates how you can use the
PAL ROUND() function to round the values in a particular field to
a specified number of digits. At the end of the document there
is a line by line explanation of the PAL code. Before making
global changes to a table, it's a good idea to first make a
backup copy of the table using Tools | Copy | Table.
1. To enter a script that will round the values in a specific
field, select <F10> Scripts | Editor | New (For versions
earlier than 4.0, select Write instead of New) and type
ROUND and press <ENTER>. On the screen, type the
following code:
EDIT "Table_Name"
MOVETO [Field_Name]
SCAN
[]=ROUND([],n)
ENDSCAN
2. To play the script, select <F10> Scripts | Play, type
ROUND and press <ENTER>.
For additional information on PAL, refer to the PAL Reference
Guide (for versions earlier than 4.0, refer to the PAL User's
Guide). For additional information on how computers and Paradox
uses numbers, refer to Technical Information sheet number 1148.
Explanation of the PAL Code:_____________________________________
EDIT "Table_name" Selects the table. Replace the word
Table_Name with the actual name of your
table. Don't forget to type the
quotation marks.
MOVETO [Field_name] Selects the field. Replace the word
Field_Name with the name of the field to
be changed. Don't forget to type the
square brackets.
PRODUCT : Paradox NUMBER : 520
VERSION : All
OS : DOS
DATE : December 3, 1992 PAGE : 2/2
TITLE : Rounding Values in a Field
SCAN Tell Paradox to scan through record by
record.
[]=ROUND([],n) Does the actual rounding. Replace n with
the number of decimal places desired.
ENDSCAN Ends the scan.
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.